<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>日期插件DEMO</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<script language="javascript" src="js/jquery.js"></script>
		<script language="javascript" type="text/javascript" src="<%=path%>/My97DatePicker/WdatePicker.js"></script>
		<!--
		<link rel="stylesheet" type="text/css" href="styles.css">
		-->
		<script type="text/javascript">
			/***
			$(document).ready(function(){
				$("#myButton").click(function(){
					$.getJSON("loginAction!jsonTest.action",null,function(data){
						alert(eval(data));
						$("#myData").html(dataStr);
					});
				});
			});
			*/
			$(document).ready(function(){
				$("#myButton").click(function(){
					$.post("loginAction!jsonTest.action",null,function(data){
						//要把DATA数据转换成json对象
						var dataStr = data.id+"--"+data.userName+"--"+data.password+"--"+data.realName;
						$("#myData").html(dataStr);
					});
				});
			});
		</script>
		<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
		<script type="text/javascript">
			window.onload = function(){
				var oFCKeditor = new FCKeditor('myTextArea');
				oFCKeditor.Width = "60%";
    			oFCKeditor.Height = "500px";
				oFCKeditor.ToolbarSet = "myToolbarSet";
		    	oFCKeditor.BasePath = "<%=path%>/fckeditor/";
		    	oFCKeditor.ReplaceTextarea();
			}
	    </script>
	</head>
	<body>
		日期控件例子：
		<br />
		例子一：一般用法
		<br />
		<input class="Wdate" type="text" readonly="readonly" name="fdate1" onclick="WdatePicker({skin:'deepblue'})" size="24">
		<br />
		例子二：限制日期的范围是 2006-09-10到2008-12-20
		<br />
		<input class="Wdate" type="text" onfocus="WdatePicker({skin:'default',minDate:'2006-09-10',maxDate:'2008-12-20'})" size="24" />
		<br />
		例子三：限制日期的范围是 2008-3-8 11:30:00 到 2008-3-10 20:59:30
		<br />
		<input type="text" class="Wdate" id="d412" onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'2008-03-08 11:30:00',maxDate:'2008-03-10 20:59:30'})" value="2008-03-09 11:00:00" />
		例子四：限制日期的范围是 2008年2月 到 2008年10月
		<br />
		<input type="text" class="Wdate" id="d413" onfocus="WdatePicker({dateFmt:'yyyy年M月',minDate:'2008-2',maxDate:'2008-10'})" />
		<br />
		例子五：限制日期的范围是 8:00:00 到 11:30:00
		<br />
		<input type="text" class="Wdate" id="d414" onfocus="WdatePicker({dateFmt:'H:mm:ss',minDate:'8:00:00',maxDate:'11:30:00'})" />
		<br />
		更多功能实例请登陆以下网址查看：
		<a href="http://www.my97.net/dp/demo/index.htm" target="_black">实例地址</a>
		
		<h1>JSON实例</h1>
		<hr/>
		<input id="myButton" type="button" value="显示JSON数据"/>
		<div id="myData"></div>
		
		<h1>FCKEDIT实例</h1>
		<textarea name="myTextArea">这是一个FCKeditor_TextArea实例</textarea>
		
		<h1>struts2</h1>
		<s:form>
			<s:doubleselect label="请选择所在省市" name="province" list="{'四川省','山东省'}" doubleName="city" doubleList="top =='四川省'?{'成都市', '绵阳市'}:{'济南市', '青岛市'}"/>
		</s:form>
		
		
		
	</body>
</html>
